Repository navigation
docs(angular): add RTL Support for the Angular UI Kit - #646
aanshisingh-cometchat wants to merge 6 commits into
Conversation
New page ui-kit/angular/customization/rtl-support (Theming group, after Localization): layout direction vs language, following <html dir>, the UIKitSettingsBuilder.setLayoutDirection() / CometChatUIKit.setLayoutDirection() global setting, the per-component layoutDirection input, precedence, what mirrors, what stays LTR, text direction, custom views and CDK overlays. Also: a Layout Direction section and input row on the 41 component pages that take the input, the components overview, Methods, Localization (Arabic, 20 languages; fixes the Date/Time Formatting link), an RTL troubleshooting table, the llms index and the docs.json sidebar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Matches uikit-angular d1a2d061 (PR #673): the ongoing-call frame now has dir="ltr". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
… Search Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PrajwalDhuleCC
left a comment
There was a problem hiding this comment.
Checked this against the Angular UI Kit at the head of cometchat-team/uikit-angular#686 (2ad9c79d, version 5.4.0). The docs were written against d1a2d061, and the kit has had about 40 commits since, so a couple of statements are now out of date (inline).
These match the kit:
UIKitSettingsBuilder.setLayoutDirection(),CometChatUIKit.setLayoutDirection(), andinit()applying the builder's value (or'auto') before anything else, so a direction set beforeinit()is replaced.init()selecting the browser's language, sosetCurrentLanguage()belongs after it.- The exported
CometChatLayoutDirectionandCometChatTextDirectiontypes. - Which components take the input: every documented component page you touched does. Smart Replies, Conversation Starter, Conversation Summary and the other base components don't, and neither do the two search result lists.
- The order in "Which Setting Wins", including the global setting as it was when the enclosing component was created, and no
dirwritten with'auto'and nothing set. - The
dirwrapper warning, the icon table (it matches the kit's mirrored-icons list), mirrored popover placements, the arrow keys, the link dialog's URL field, the call screen, the numbered-list icon, and the CDK overlay'sdirectionoption. - The new anchor links resolve.
Outside the inline notes:
- The description still points to uikit-angular PR #673; the kit PR is now cometchat-team/uikit-angular#686.
- As the description says, this should merge only once 5.4.0 is on npm. The latest there is now 5.3.0, not 5.2.3 as the description says.
I checked these by reading the kit's code, not by running it. Please verify each point yourself.
… texts Addresses Prajwal's review on #646: - getDirection() returns 'rtl' for every language written in a right-to-left script (56062d18), and the no-argument call uses the language the UI Kit is actually showing (rtl-support quick reference and body, methods). - Localization: new Count Texts section for member_count_*, thread_reply_count_*, thread_view_reply_count_*, last_seen_minutes_ago_* and last_seen_hours_ago_* (a9e9f9a8), and RelativeTimeConfig minutesPlural / hoursPlural. RTL page's Numbers and dates links to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
|
@PrajwalDhuleCC Thanks. Both inline points are fixed in a9c739f and replied to on their threads. The description now points to cometchat-team/uikit-angular#686 and says npm is at 5.3.0. This still merges only once 5.4.0 is on npm. |
Navigation only; the page URL is unchanged, so no redirect is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
ashfaqcometchat
left a comment
There was a problem hiding this comment.
Reviewed at 51ad9f02 against the published @cometchat/chat-uikit-angular 5.4.0 (on npm since today, so the merge-timing note in the description no longer blocks).
No build, redirect or link problems: 0 dangling nav refs, 0 broken internal links, all new anchors resolve. The documented API (setLayoutDirection, getDirection, CometChatLayoutDirection, CometChatTextDirection, the plural count keys) matches the package, and every component page that gained layoutDirection has the input in 5.4.0.
Minor fixes:
- "Every public component" overclaims — see the inline comment. The same sentence is in the new Layout Direction entry in
components/components-overview.mdxand in the Quick Reference row atrtl-support.mdx:14. - Stale language count:
ui-kit/angular/overview.mdx:15still says "19 languages built-in"; Localization now says 20. - Description is out of date: it says the page sits under "Theming, after Localization", but
docs.jsonputs it in the Features group after Campaigns; it also says 5.4.0 is not published.
…uages Addresses Ashfaq's review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
|
@ashfaqcometchat Thanks. All three are fixed:
|
ashfaqcometchat
left a comment
There was a problem hiding this comment.
Re-reviewed at 46f630e6: all findings from my earlier review are fixed. Approving.
Description
Adds RTL (right-to-left) support documentation for the Angular UI Kit v5. It matches the React Native (#645), Android (#627) and Flutter (#622) RTL docs, and replaces the Angular half of the earlier combined draft #618.
New page: RTL Support (
ui-kit/angular/customization/rtl-support; sidebar: Features, after Campaigns). It covers:'auto'follows the page's direction (<html dir>); the UI Kit never writes it.<html dir>, set fromCometChatLocalize.getDirection(language);UIKitSettingsBuilder.setLayoutDirection('auto' | 'ltr' | 'rtl')for the whole kit;CometChatUIKit.setLayoutDirection, which applies to components created afterwards and must be called afterinit()(init()applies the builder's value, or'auto').layoutDirectioninput ('ltr' | 'rtl') on every public component. Base components follow the component they sit in.dirwrapper doesn't override a global'ltr'/'rtl'.+Ncounters, the Calls SDK's call screen;:dir(rtl), reading the direction from the element, and passing it to Angular CDK overlays.Updated pages:
layoutDirectionrow in the properties/inputs table and a "Layout Direction" section with an example and the input's type and default.setLayoutDirectionin theUIKitSettingsBuildertable, plus a Layout Direction section.ar) added (now 20 languages), and a note that language and layout direction are separate settings. Also fixes the Related "Date/Time Formatting" link, which pointed to the Localization page itself.docs.json: page added to the sidebar.llms-angular-v5.mdx: an RTL rule and the page link.The TypeScript examples were type-checked against the UI Kit's RTL branch (uikit-angular PR #673, b910b2f3) and
@angular/cdk21: 0 errors. The docs match the PR at d1a2d061, including the call-screen fix. The kit PR is now cometchat-team/uikit-angular#686 (merged intodev-v5); a9c739f brings the docs up to its head (2ad9c79d):getDirection()for every right-to-left language, and the Arabic count texts.Related Issue(s)
No GitHub issue. Tracked on Multica:
layoutDirectionsetting: ENG-41331Type of Change
Checklist
Additional Information
@cometchat/chat-uikit-angular5.4.0 (from cometchat-team/uikit-angular#686), which is now on npm, so this can merge.mint broken-linkspasses, and a script confirmed every new internal link and#anchorresolves.docs.jsonis valid JSON. Amint devpreview hasn't been run yet.useCometChatLayoutDirectionequivalent, so custom views read the direction from the element (getComputedStyle(el).direction).Screenshots (if applicable)
N/A. Text-only changes. RTL screenshots will follow in a separate update.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz